package com.isoftstone.securityframework.device.local;

import java.util.List;

import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Service;

import com.isoftstone.securityframework.api.Permission;
import com.isoftstone.securityframework.auth.realm.SubjectPermissionRealm;
import com.isoftstone.securityframework.device.Device;

@Service
public class DevicePermissionRealm implements SubjectPermissionRealm{

	@Override
	public List<Permission> getSubjectPermission(Subject subject) {
		Device d = (Device) subject;
		return d.getPermissions();
	}

}
